import { BrowserRouter } from 'react-router-dom'
import { StyleProvider } from '@ant-design/cssinjs'
import { ConfigProvider } from 'antd'
import RouteView from './routers/RouteView'
import ErrorBoundary from './components/common/ErrorBoundary'
import { appConfig } from './config'

function App() {
  return (
    <ErrorBoundary>
      <StyleProvider hashPriority="high">
        <ConfigProvider theme={appConfig.theme}>
          <BrowserRouter>
            <RouteView />
          </BrowserRouter>
        </ConfigProvider>
      </StyleProvider>
    </ErrorBoundary>
  )
}

export default App